From: Jasper St. Pierre Date: Wed, 20 Nov 2013 17:06:14 +0000 (-0500) Subject: viewSelector: Don't show pages until they need to be visible X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3039 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1139a02b407aa0efb52a8875525b48e52c5deb09;p=gnome-shell.git viewSelector: Don't show pages until they need to be visible AppDisplay queues a deferred work to load frequently used apps when the apps page is loaded. Unfortunately, when the overview is first opened, all the pages start out visible and then immediately get hidden, so the deferred work runs immediately after the first overview opening, whether the user was going to view their frequent apps or not. Start all pages off as hidden, and rearrange the code so that pages are only shown when they really need to be. https://bugzilla.gnome.org/show_bug.cgi?id=712753 --- diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index eef8c0a88..0bc0f20af 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -157,17 +157,14 @@ const ViewSelector = new Lang.Class({ }, show: function() { - this._activePage = this._workspacesPage; - this.reset(); - this._appsPage.hide(); - this._searchPage.hide(); + this._workspacesDisplay.show(); + this._activePage = null; + this._showPage(this._workspacesPage); if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows()) Main.overview.fadeOutDesktop(); - - this._showPage(this._workspacesPage, true); }, zoomFromOverview: function() { @@ -203,6 +200,7 @@ const ViewSelector = new Lang.Class({ this._a11yFocusPage(page); }) });; + page.hide(); this.actor.add_actor(page); return page; },